#ifndef CONN
#define CONN
#include <cstdio>
#include <cstdlib>
#include <netinet/in.h>
#include <stdexcept>
#include <sys/socket.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <iostream>
#include <cstdio>
#include <string.h>
using namespace std;
#define PORT 2000
#define MAX_NUM 20

class Connect{
public:
    struct sockaddr_in *addrInfo = NULL;
    int protofamily = AF_INET;
    int type = SOCK_STREAM;
    int protocol = IPPROTO_TCP;
    int port = PORT;
    int sfd = -1;

    Connect(){};
    int createConnect();
    int createConnect(int protofamily, int type, int protocol, int port);
    int listenClient();
    int clientConnect(const char* ip, int port);
    int closeConn();
};

#endif
